package eee.xiang.cloud_learning.service;

import eee.xiang.cloud_learning.bean.entity.TAddress;
import eee.xiang.cloud_learning.bean.entity.TUser;
import eee.xiang.cloud_learning.dao.mapper.TAddressMapper;
import eee.xiang.cloud_learning.dao.mapper.TUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author x-yin
 * @Date 2019/10/15
 */
@Service
public class ShardDataService {

    @Autowired
    private TUserMapper userMapper;

    @Autowired
    private TAddressMapper addressMapper;

    public int saveUser(TUser user){
        return userMapper.insert(user);
    }

    public int saveAdress(TAddress address){
        return addressMapper.insert(address);
    }

}
